
package me.zhengjie.domain;

import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.persistence.*;
import javax.validation.constraints.*;
import java.sql.Timestamp;
import java.io.Serializable;

/**
* @website https://el-admin.vip
* @description /
* @author IQW
* @date 2022-07-13
**/
@Entity
@Data
@Table(name="app_area")
public class AppArea implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "area_id")
    @ApiModelProperty(value = "责任区ID")
    private Integer areaId;

    @Column(name = "title",nullable = false)
    @NotBlank
    @ApiModelProperty(value = "名称")
    private String title;

    @Column(name = "fid")
    @ApiModelProperty(value = "父级ID")
    private Integer fid;

    @Column(name = "gtzmj")
    @ApiModelProperty(value = "国土总面积")
    private Float gtzmj;

    @Column(name = "ldzmj")
    @ApiModelProperty(value = "林地总面积")
    private Float ldzmj;

    @Column(name = "yld")
    @ApiModelProperty(value = "有林地")
    private Float yld;

    @Column(name = "gmld")
    @ApiModelProperty(value = "灌木林地")
    private Float gmld;

    @Column(name = "wcld")
    @ApiModelProperty(value = "未成林地")
    private Float wcld;

    @Column(name = "mpd")
    @ApiModelProperty(value = "苗圃地")
    private Float mpd;

    @Column(name = "wlmld")
    @ApiModelProperty(value = "无林木林地")
    private Float wlmld;

    @Column(name = "fzscld")
    @ApiModelProperty(value = "辅助生产林地")
    private Float fzscld;

    @Column(name = "slfgl")
    @ApiModelProperty(value = "森林覆盖率")
    private Float slfgl;

    @Column(name = "lhl")
    @ApiModelProperty(value = "绿化率")
    private Float lhl;

    @Column(name = "ldmj")
    @ApiModelProperty(value = "林地面积")
    private Float ldmj;

    @Column(name = "img")
    @ApiModelProperty(value = "图片")
    private String img;

    @Column(name = "points")
    @ApiModelProperty(value = "点位JSON")
    private String points;

    @Column(name = "content")
    @ApiModelProperty(value = "详情")
    private String content;

    @Column(name = "status")
    @ApiModelProperty(value = "状态")
    private Integer status;

    @Column(name = "create_time")
    @ApiModelProperty(value = "createTime")
    private Timestamp createTime;

    @Column(name = "update_time")
    @ApiModelProperty(value = "updateTime")
    private Timestamp updateTime;

    public void copy(AppArea source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}